package zeebe.subprocess;

import io.zeebe.client.ZeebeClient;

public class SubprocessStart {
    public static void main(String[] args) {
        ZeebeClient client = ZeebeClient.newClientBuilder()
                .brokerContactPoint("localhost:26500")
                .usePlaintext()
                .build();

        System.out.println("启动工作流");
        String processId = "subprocess";
        client.newCreateInstanceCommand()
                .bpmnProcessId(processId)
                .latestVersion()
                .send()
                .join();
    }
}
